package com.anysoft.bean;

import java.util.ArrayList;

/**
 * @ProjectName：gy_fund-android
 * @ClassDescription：调查问卷
 * @CreateUser： yanbin
 * @CreateTime：2017-03-06 16:09
 * @ModifiedUser：
 * @ModifiedTime：
 * @ModifiedRemark：
 */

public class QueryQuestionnaireBean extends BaseBean  {

    private ArrayList<QuestionBean> data;

    public ArrayList<QuestionBean> getData() {
        return data;
    }

    public void setData(ArrayList<QuestionBean> data) {
        this.data = data;
    }

    public static class QuestionBean implements Comparable<QuestionBean> {
        private String questionId;//问卷编号
        private String content;//问题
        private String sequence;//排序
        private String maxScore;//最高分数
        private String minScore;//最低分数
        private String myAnswer;//我的答案
        private ArrayList<OptionBean> options;

        @Override
        public int compareTo(QuestionBean bean) {
            try {
                if(Integer.parseInt(bean.sequence)>Integer.parseInt(this.sequence)){
                    return -1;
                }else if(Integer.parseInt(bean.sequence)==Integer.parseInt(this.sequence)){
                    return 0;
                }
            }catch(Exception e){
                e.printStackTrace();
            }
            return 1;
        }

        public static class OptionBean implements Comparable<OptionBean>{

            private String optionId;//选择id
            private String questionId;//问题编号
            private String content;//选项内容
            private String score;//分数
            private String sequence;//排序

            public String getOptionId() {
                return optionId;
            }

            public void setOptionId(String optionId) {
                this.optionId = optionId;
            }

            public String getQuestionId() {
                return questionId;
            }

            public void setQuestionId(String questionId) {
                this.questionId = questionId;
            }

            public String getContent() {
                return content;
            }

            public void setContent(String content) {
                this.content = content;
            }

            public String getScore() {
                return score;
            }

            public void setScore(String score) {
                this.score = score;
            }

            public String getSequence() {
                return sequence;
            }

            public void setSequence(String sequence) {
                this.sequence = sequence;
            }

            @Override
            public int compareTo(OptionBean bean) {
                try {
                    if(Integer.parseInt(bean.sequence)>Integer.parseInt(this.sequence)){
                        return -1;
                    }else if(Integer.parseInt(bean.sequence)==Integer.parseInt(this.sequence)){
                        return 0;
                    }
                }catch(Exception e){
                    e.printStackTrace();
                }
                return 1;
            }
        }

        public ArrayList<OptionBean> getOptions() {
            return options;
        }

        public void setOptions(ArrayList<OptionBean> options) {
            this.options = options;
        }

        public String getQuestionId() {
            return questionId;
        }

        public void setQuestionId(String questionId) {
            this.questionId = questionId;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public String getSequence() {
            return sequence;
        }

        public void setSequence(String sequence) {
            this.sequence = sequence;
        }

        public String getMaxScore() {
            return maxScore;
        }

        public void setMaxScore(String maxScore) {
            this.maxScore = maxScore;
        }

        public String getMinScore() {
            return minScore;
        }

        public void setMinScore(String minScore) {
            this.minScore = minScore;
        }

        public String getMyAnswer() {
            return myAnswer;
        }

        public void setMyAnswer(String myAnswer) {
            this.myAnswer = myAnswer;
        }
    }
}
